<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8"/>
    <title>Face++ JavaScript SDK</title>
</head>
<body>
<pre id="response">Loading...</pre>
<script type="text/javascript" src="vendor/facepp/facepp-sdk.min.js"></script>
<script type="text/javascript">
    (function () {
        var api = new FacePP('79703d127720b84da26fa4690008d27a', '7Rd2wSbmj0bsBcqpwOenFJDWLkmvLt8W');
        api.request('detection/detect', {
            url: 'http://cn.faceplusplus.com/static/resources/python_demo/1.jpg'
        }, function (err, result) {
            if (err) {
                // TODO handle error
                return;
            }
            // TODO use result
            document.getElementById('response').innerHTML = JSON.stringify(result, null, 2);
        });
    })();
</script>
</body>
</html>
